package com.crm.controller;

import com.crm.base.BaseController;
import com.crm.domain.entity.CustomerLoss;
import com.crm.result.Result;
import com.crm.service.CustomerLossService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 客户流失控制器
 */
@RestController
@RequestMapping("/customer-loss")
public class CustomerLossController extends BaseController<CustomerLossService, CustomerLoss> {

    // 确认流失
    @ResponseBody
    @RequestMapping("/confirm-loss")
    public Result<Boolean> lossCustomerLoss(CustomerLoss c) {
        return baseService.loss(c) ? Result.success() : Result.failure();
    }
}
